package com.wuchao.entity;

import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author wuchao66
 * @Date 2022/6/27 15:20
 * @Version 1.0
 */
public class User {
    //1-多 改成泛型集合
    private List<Stu> list;
    //加一个新的属性，
    private Stu stu;

    public Stu getStu() {
        return stu;
    }

    public void setStu(Stu stu) {
        this.stu = stu;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                '}';
    }

    private  int id;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    private String name;
    private String sex;

    public List<Stu> getList() {
        return list;
    }

    public void setList(List<Stu> list) {
        this.list = list;
    }
}
